const express = require("express");

const app = express();

const path = require("path");

const ejs = require("ejs");
app.listen(5000,()=>{
    console.log("5000端口已经打开");
})
//设置模板引擎
app.set('view engine','ejs');
//设置模板文件存放位置
app.set('views',[path.join(__dirname,'module')])
app.engine('html',require('ejs').__express);
app.use("/static",express.static(path.join(__dirname,"/static")))//开放静态资源
app.use(express.urlencoded({extends:false}));
let loginrouter = require("./login.js");
let registeroter = require("./register.js");
app.use(loginrouter);
app.use(registeroter);
